package com.zh.constant;

/**
 * 优先级常量
 */
public interface PriorityConstant {
    /**
     * 紧急
     */
    Integer P0 = 0;
    /**
     * 次紧急
     */
    Integer P1 = 1;
    /**
     * 不急
     */
    Integer P2 = 2;

    static boolean validPriority(Integer priority) {
        return P0.equals(priority) || P1.equals(priority) || P2.equals(priority);
    }
    static String getPriorityName(Integer priority) {
        if (P0.equals(priority)) {
            return "P0";
        } else if (P1.equals(priority)) {
            return "P1";
        } else if (P2.equals(priority)) {
            return "P2";
        }
        return "未知";
    }
}
